package com.movitech.mobile.cz.base.modules.config;

/**
 * 采购流程类型
 * @author julius
 * @since 2018-03-16
 *
 */
public enum WFlowFormStatusEnum {
	WFLOW_FROM_STATUS_1("进行中", 1),
	WFLOW_FROM_STATUS_2("已定标", 2),
	WFLOW_FROM_STATUS_3("已流标", 3),

	MBS_BPM_FLAG_1("初始",0),
	MBS_BPM_FLAG_2("审批中",1),
	MBS_BPM_FLAG_3("审批完成",2);

	private String desc;
	private int code;

	private WFlowFormStatusEnum(String desc, int code){
		this.desc = desc;
		this.code = code;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}

	public int getCode() {
		return code;
	}

	public void setCode(int code) {
		this.code = code;
	}

	public static String getNameByKey(int key){
		for(WFlowFormStatusEnum i :WFlowFormStatusEnum.values()){
			if(i.getCode()==key){
				return i.getDesc();
			}
		}
		return null;
	}
	
}
